package Java学习;

import java.util.Random;

public class 选择排序 {
    public static void main(String[] args) {
        Random rm = new Random();
        int[] arr = new int[100000];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = rm.nextInt();
        }
        long start = System.currentTimeMillis();
        for (int i = 0; i < arr.length; i++) {
            for (int i1 = i+1; i1 < arr.length; i1++) {
                int temp = arr[i1];
                arr[i1] = arr[i];
                arr[i] = temp;
            }
        }
        long end = System.currentTimeMillis();
        System.out.println(end - start);
    }
}
